-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MEAR-285] check return value from mkdirs #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
@@ -453,7 +453,10 @@ private void copyModules( final JavaEEVersion javaEEVersion, | |||
{ | |||
getLog().info( "Copying artifact [" + module + "] to [" + module.getUri() + "] (unpacked)" ); | |||
// Make sure that the destination is a directory to avoid plexus nasty stuff :) | |||
destinationFile.mkdirs(); | |||
if ( !destinationFile.mkdirs() ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to be causing an issue when build is run without "clean".
[INFO] Copying artifact [ejb:com.aaa.bbb:bbb-ejb:1.0.0.0-SNAPSHOT] to [bbb-ejb.jar]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:3.1.0:ear (default-ear) on project bbb-ear: Failed to create directory /Checkout/project/bbb/bbb-ear/target/temp/bbb-ejb.jar -> [Help 1]
Probably it should be wrapped with something like:
if ( !destinationFile.isDirectory() )
{
if ( !destinationFile.mkdirs() )
{
throw new MojoExecutionException( "Error creating " + destinationFile );
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. That's not the right place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the one
ce76c3e#diff-0520547103a4a317e72df7f8c27e3d61R757
Sounds plausible. Can you open an issue in the Jira and assign to me?
…On Thu, Oct 1, 2020 at 8:45 AM Mikhail Gavrilov ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/main/java/org/apache/maven/plugins/ear/EarMojo.java
<#15 (comment)>
:
> @@ -453,7 +453,10 @@ private void copyModules( final JavaEEVersion javaEEVersion,
{
getLog().info( "Copying artifact [" + module + "] to [" + module.getUri() + "] (unpacked)" );
// Make sure that the destination is a directory to avoid plexus nasty stuff :)
- destinationFile.mkdirs();
+ if ( !destinationFile.mkdirs() )
This change seems to be causing an issue when build is run without "clean".
[INFO] Copying artifact [ejb:com.aaa.bbb:bbb-ejb:1.0.0.0-SNAPSHOT] to
[bbb-ejb.jar]
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-ear-plugin:3.1.0:ear (default-ear) on
project bbb-ear: Failed to create directory
/Checkout/project/bbb/bbb-ear/target/temp/bbb-ejb.jar -> [Help 1]
Probably it should be wrapped with something like:
if ( !destinationFile.isDirectory() )
{
if ( !destinationFile.mkdirs() )
{
throw new MojoExecutionException( "Error creating " + destinationFile );
}
}
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#15 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVP2BRCHY6LCADKNCI4BTSIQ6RLANCNFSM4RZSOHKA>
.
--
Elliotte Rusty Harold
elharo@macfaq.com
|
I have raised a PR associated with the original issue. |
Yes, please since that issue is already closed and shipped. I haven't been
able to reproduce this myself yet.
…On Thu, Oct 1, 2020 at 8:36 AM Mikhail Gavrilov ***@***.***> wrote:
I have raised a PR <#17>
associated with the original issue.
Should I open a new one for it?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVP2A2MDWZKD45ZTGIKADSIRZVHANCNFSM4RZSOHKA>
.
--
Elliotte Rusty Harold
elharo@macfaq.com
|
@elharo, I discussed this issue with @zzzLobster and we decided that I'll take care of openning new bug. At the moment I'm able to reproduce this issue on Windows 10 x64 and CentOS 7 x64 with https://github.com/mabrarov/dockerfile-test:
I'm in the process of creation of integration test in maven-ear-plugin repository to reproduce this issue and to validate fix of @zzzLobster. I believe I'll complete my actions within next 12-24 hrs. |
@mabrarov , I have created the issue, just to push a new commit with the correct issue number in description. |
@hboutemy